/**
 * 首页模块接口列表
 */

import base from './base'; // 导入接口域名列表
import axios from '@/request/httpRequest'; // 导入http中创建的axios实例
import qs from 'qs'; // 根据需求是否导入qs模块

const home = {
	//banner
	banner(params) {
		return axios.post(`${base.sqq}api/index/banner`, params);
	},
	//cate分类
	getClasses(params) {
		return axios.post(`${base.sq}/client/ProductClasses/getClasses?size=M&terminaltype=PC&containsPointsClasses=true`,
			qs.stringify(params));
	},
	//cate分类banenr
	categoryBanner(params) {
		return axios.post(`${base.sqq}api/index/categoryBanner`, params);
	},
	//商品列表
	getProductList(params) {
		return axios.post(`${base.sq}/client/Products/getProductList?size=M&terminaltype=PC`, params);
	},
	//获取看看
	getAvailableCoupon(params) {
		return axios.post(`${base.sq}/coupon/MemberCouponServer/getAvailableCoupon?size=M&terminaltype=PC`, params);
	},
	//猜你喜欢
	getRecommendCartList(params) {
		return axios.post(`${base.sq}/client/Products/getRecommendCartList?size=M&terminaltype=PC`, params);
	},
	//免密登录
	uLoginWithMobile(params) {
		return axios.post(`${base.sqq}api/user/uLoginWithMobile`, params);
	},
	//专题列表
	topic(params) {
		return axios.post(`${base.sqq}api/topic/topic`, params);
	},
	//专题详情
	detail(params) {
		return axios.post(`${base.sqq}api/topic/detail`, params);
	},
	//专题收藏
	topicCollect(params) {
		return axios.post(`${base.sqq}api/topic/topicCollect`, params);
	},
	//专题评论列表
	comment(params) {
		return axios.post(`${base.sqq}api/topic/comment`, params);
	},
	//专题评论
	addComment(params) {
		return axios.post(`${base.sqq}api/topic/addComment`, params);
	},
	//获取活动 - 秒杀列表

	getPricePreferentialList(params) {
		return axios.post(`${base.sqq}api/admin/getPricePreferentialList`, params);
	},
	//首页布局
	pcIndex(params) {
		return axios.post(`${base.sqq}api/index/pc_index`, params);
	},
	//活动封面
	preferentialAds(params) {
		return axios.post(`${base.sqq}api/admin/preferentialAds`, params);
	},
	//top单品列表图
	getTopList() {
		return axios.post(`${base.sqq}api/user/getTopList`, {});
	},
	//top单品列表
	sales(params) {
		return axios.post(`${base.sqq}api/index/sales`, params);
	},
	//标签banner
	tagDetail(params) {
		return axios.post(`${base.sqq}api/index/tagDetail`, params);
	},
	//专题banner
	topicbanner(params) {
		return axios.post(`${base.sqq}api/index/topic_banner`, params);
	},
	//网站底部备案号
	footersite(params) {
		return axios.post(`${base.sqq}api/index/footer_site`, params);
	},
	//关于我们
	footerline(params) {
		return axios.post(`${base.sqq}api/index/footer_line`, params);
	},
	//单点 登录
	casLogin(params) {
		return axios.get(`${base.sqq}api/user/casLogin?ticket=${params.ticket}`);
	},
	// 店铺列表，店铺分类api/index/shopType
	ShopType() {
		return axios.post(`${base.sqq}api/index/shopType`)
	},
	// 店铺列表
	ShopsList(params) {
		return axios.post(`${base.sqq}api/index/shops`, params)
	}
	// 其他接口…………
}

export default home;
